﻿using System;
using System.Collections.Generic;
using System.Text;
using ArlesInterfaces.Editor;
using Arles.src.model;

namespace Arles.src.controller.Commands
{
    class SkydomeCommand : Command<IEditor>
    {

        bool activate;

        public SkydomeCommand(IEditor editor, bool activate)
            : base(editor, "SceneOptions", 1)
        {
            this.activate = activate;
        }

        public override void Execute()
        {
            if (activate)
                ObjectFactory.Instance.CreateObject(Editor.Instance.Scene, ObjectType.Skydome);
            else
            {
                Editor.Instance.Scene.DeleteObject(ObjectType.Skydome);
            }
        }

        public override void Undo()
        {
            if (activate)
                Editor.Instance.Scene.DeleteObject(ObjectType.Skydome);
            else
                ObjectFactory.Instance.CreateObject(Editor.Instance.Scene, ObjectType.Skydome);
        }

        public override string toString()
        {
            return activate.ToString();
        }
    }
}

